package com.yeung.exam;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class 字符串中找数字 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
//        System.out.println((int) '0');
        while (scanner.hasNext()) {
            String line = scanner.next();
            char[] chars = line.toCharArray();
            List<Character> numbers = new ArrayList<Character>();
            for (char aChar : chars) {
                if (aChar >= 48 && aChar <= 57) {
                    numbers.add(aChar);
                }
            }
            if (numbers.size() > 0) {
                Collections.sort(numbers);
                for (Character number : numbers) {
                    System.out.print(number);
                }
            } else
                System.out.println("-1");
        }

    }
}
